------------------------------------- Info on HLPKEY.DLL Author: Jeff Simms - CIS 72200,3173 Date: September 21,1992 ------------------------------------- DLL sets task specific F1 hook. When F1 is pressed a Keypress event is trigger in the form of choice with Keyascii equal to 112. Eliminates need for separate F1 help KeyPress events. To try demo: Put HLPKEY.DLL in your Windows system directory. Declares: Declare Function SetHook% Lib "hlpkey.dll" (ByVal hWnd As Integer) 'In Form_Load you can put i% = SetHook(hWnd) Declare Sub RemoveHook Lib "hlpkey.dll" () 'In Form_Unload you can put RemoveHook 'no parens Notes: 1) You must call RemoveHook if you want to call SetHook again. 2) You may use just one form with the F1 KeyPress event code. In other words its keypress event will be triggered (must be loaded of course) even if another form in the same project has the input focus when the user presses F1. This is the idea of a task specific hook. Note on source code: Due to a 'mistake' in SetWindowsHookEx() the third param needs to be the module handle and not the instance handle as shown in docs. If you have any questions let me know. DLL is FreeWare. Jeff Simms CIS 72200,3173